package com.qf.web;

import com.qf.service.Impl.SheetServiceImpl;
import com.qf.service.SheetService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/sheetAddServlet.action")
public class SheetAddServlet extends HttpServlet {
    private SheetService sheetService = new SheetServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String sheetName = req.getParameter("sheetName");
        sheetService.add(sheetName);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req,resp);
    }
}
